package com.allenkerr.model;

import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Map;

/**
 * Created by 小柯 on 17/6/22.
 */
@Document(collection = "people")
public class Person implements Serializable {

    private String username;

    private String password;

    private String realname;

    private Map<String, Object> indexes;

    public Person() {
    }

    public Person(String username, String password, String realname) {
        this.username = username;
        this.password = password;
        this.realname = realname;
    }

    public Person(String username, String password, String realname, Map<String, Object> indexes) {
        this.username = username;
        this.password = password;
        this.realname = realname;
        this.indexes = indexes;
    }

    @Override
    public String toString() {
        return "Person{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", realname='" + realname + '\'' +
                ", indexes=" + indexes +
                '}';
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public Map<String, Object> getIndexes() {
        return indexes;
    }

    public void setIndexes(Map<String, Object> indexes) {
        this.indexes = indexes;
    }
}
